package com.toplabs.unashu.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.toplabs.unashu.annotation.CreateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 日志实体类
 * </p>
 *
 * @author ityanger
 * @since 2020-08-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class Log implements Serializable {

    private static final long serialVersionUID = 7368729175948672075L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id; // id

    private String url;  // 请求的url

    private String operation; // 操作内容

    private Long time; // 耗时

    private String ip; // IP地址

    private String location; // 操作地点

    private String method; // 操作方法

    private String params; // 方法参数

    @CreateTime
    private Date createTime; // 创建时间
}
